package com.itheima.vo;

import com.itheima.domain.db.UserInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class SoundVo implements Serializable {

    private Integer id;
    private String avatar;
    private String nickname;
    private String gender;
    private Integer age;
    private String soundUrl;
    private Integer remainingTimes;

    public void setUserInfo(UserInfo userInfo) {
        id = Integer.parseInt(userInfo.getId().toString());
        avatar = userInfo.getAvatar();
        nickname = userInfo.getNickname();
        gender = userInfo.getGender();
        age = userInfo.getAge();

    }

}
